package com.cheston.message.controller;

import com.cheston.common.web.interceptor.ControllerBase;
import com.cheston.user.logon.RpcUserService;
import com.cheston.user.logon.UserInfoResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("acl")
public class AclController extends ControllerBase {

    @Autowired
    RpcUserService rpcUserService;

    @GetMapping("al")
    public String get(){
        return "ok";
    }

    @GetMapping("getUserInfo")
    public UserInfoResponse getUserInfo(){
        return rpcUserService.getUserInfo(1L);
    }
}
